package com.hrpc.transport.message;

/**
 * 服务提供方回复的响应
 */
public class hRpcResponse {
    //请求ID
    private long requestId;
    //压缩的类型，序列化的方式
    private byte compressType;
    private byte serializeType;

    private long timeStamp;
    //响应的结果
    private Object body;
    //响应码 : 1-success 2-异常
    private byte code;

    public long getRequestId() {
        return requestId;
    }

    public void setRequestId(long requestId) {
        this.requestId = requestId;
    }

    public byte getCompressType() {
        return compressType;
    }

    public void setCompressType(byte compressType) {
        this.compressType = compressType;
    }

    public byte getSerializeType() {
        return serializeType;
    }

    public void setSerializeType(byte serializeType) {
        this.serializeType = serializeType;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public Object getBody() {
        return body;
    }

    public void setBody(Object body) {
        this.body = body;
    }

    public byte getCode() {
        return code;
    }

    public void setCode(byte code) {
        this.code = code;
    }

    public hRpcResponse() {
    }

    public hRpcResponse(long requestId, byte compressType, byte serializeType, long timeStamp, Object body, byte code) {
        this.requestId = requestId;
        this.compressType = compressType;
        this.serializeType = serializeType;
        this.timeStamp = timeStamp;
        this.body = body;
        this.code = code;
    }
}
